<?php

namespace App\Admin\Controllers;

use App\Admin\Repositories\AdvertiseRepository;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
class AdvertiseController extends AdminController
{
    /**
     * Make a grid builder.
     *
     * @return Grid
     */
    protected function grid()
    {
        $industryStr = '[{"id":"21474836585","name":"返利平台"},{"id":"21474836586","name":"电商导购平台"},{"id":"21474836587","name":"跨境电商平台"},{"id":"21474836588","name":"二手电商平台"},{"id":"21474836589","name":"综合电商平台"},{"id":"21474836590","name":"社交电商"},{"id":"21474836591","name":"带货达人营销机构"},{"id":"21474836592","name":"垂直电商平台"},{"id":"21474836482","name":"招商加盟服务"},{"id":"21474836683","name":"教育培训加盟"},{"id":"21474836684","name":"成人用品招商加盟"},{"id":"21474836685","name":"医疗招商加盟"},{"id":"21474836686","name":"汽车用品及服务招商加盟"},{"id":"21474836687","name":"招商加盟综合平台"},{"id":"21474836688","name":"其他生活服务招商加盟"},{"id":"21474836689","name":"农林牧渔招商加盟"},{"id":"21474836690","name":"服饰鞋帽箱包招商加盟"},{"id":"21474836691","name":"休闲娱乐招商加盟"},{"id":"21474836692","name":"房地产招商加盟"},{"id":"21474836693","name":"工业工程招商加盟"},{"id":"21474836694","name":"互联网电商服务招商加盟"},{"id":"21474836695","name":"家装家具招商加盟"},{"id":"21474836696","name":"节能环保招商加盟"},{"id":"21474836697","name":"酒店与旅游招商加盟"},{"id":"21474836698","name":"酒水招商加盟"},{"id":"21474836699","name":"零售百货招商加盟"},{"id":"21474836700","name":"亲子用品招商加盟"},{"id":"21474836701","name":"日用百货招商加盟"},{"id":"21474836702","name":"软件工具招商加盟"},{"id":"21474836703","name":"商务服务业招商加盟"},{"id":"21474836704","name":"食品招商加盟"},{"id":"21474836705","name":"数码家电招商加盟"},{"id":"21474836706","name":"特殊用途化妆品招商加盟"},{"id":"21474836707","name":"一般用途化妆品招商加盟"},{"id":"21474836708","name":"运动户外用品招商加盟"},{"id":"21474836709","name":"珠宝招商加盟"},{"id":"21474836710","name":"餐饮招商加盟"},{"id":"21474836711","name":"烘焙饮料招商加盟"},{"id":"21474836712","name":"减肥保健招商加盟"},{"id":"21474836713","name":"美容美发招商加盟"},{"id":"21474836485","name":"教育"},{"id":"21474836984","name":"教育综合服务平台"},{"id":"21474836987","name":"外语培训"},{"id":"21474836990","name":"文化艺术培训"},{"id":"21474836991","name":"教学辅助工具"},{"id":"21474836994","name":"学历教育"},{"id":"21474836995","name":"家庭教育"},{"id":"21474836996","name":"教育厅局"},{"id":"21474837012","name":"教材及学习资料"},{"id":"21474836997","name":"科学创造教育"},{"id":"21474836998","name":"老年兴趣"},{"id":"21474836999","name":"企业管理培训"},{"id":"21474837000","name":"特殊教育"},{"id":"21474837001","name":"体育培训"},{"id":"21474837002","name":"孕期教育"},{"id":"21474837003","name":"学历教育-非学历机构"},{"id":"21474837004","name":"财商培训"},{"id":"21474837005","name":"境外学校"},{"id":"21474837006","name":"留学准备与咨询"},{"id":"21474837007","name":"启蒙教育"},{"id":"21474837008","name":"早期教育"},{"id":"21474837009","name":"公务员考试培训"},{"id":"21474837010","name":"职业技能培训"},{"id":"21474837011","name":"职业资格考证培训"},{"id":"21474836486","name":"金融"},{"id":"21474837082","name":"基金"},{"id":"21474837087","name":"贵金属"},{"id":"21474837088","name":"典当"},{"id":"21474837089","name":"担保"},{"id":"21474837091","name":"投资咨询"},{"id":"21474837092","name":"信托"},{"id":"21474837093","name":"资产管理"},{"id":"21474837094","name":"非货币标准金融"},{"id":"21474837095","name":"大宗商品交易\/现货"},{"id":"21474837096","name":"金融综合服务平台"},{"id":"21474837097","name":"银行信用卡中心"},{"id":"21474837098","name":"第三方支付"},{"id":"21474837100","name":"汽车金融"},{"id":"21474837101","name":"期货期权"},{"id":"21474837102","name":"外汇"},{"id":"21474837104","name":"商业保理"},{"id":"21474837105","name":"金融辅助工具"},{"id":"21474837107","name":"消费金融"},{"id":"21474837108","name":"众筹"},{"id":"21474837109","name":"保险"},{"id":"21474837110","name":"保险代理服务"},{"id":"21474837111","name":"保险经纪服务"},{"id":"21474837112","name":"地方小额贷款"},{"id":"21474837113","name":"网络小额贷款"},{"id":"21474837114","name":"助贷平台"},{"id":"21474837115","name":"银行"},{"id":"21474837116","name":"银行理财子公司"},{"id":"21474837117","name":"券商"},{"id":"21474837118","name":"证券投资顾问"},{"id":"21474837119","name":"征信"},{"id":"21474836487","name":"旅游出行"},{"id":"21474837184","name":"旅行社"},{"id":"21474837186","name":"OTA平台"},{"id":"21474837189","name":"境外景点"},{"id":"21474837190","name":"旅游局-境内"},{"id":"21474837191","name":"旅游局-境外"},{"id":"21474837192","name":"航空旅客运输"},{"id":"21474837193","name":"游轮"},{"id":"21474837194","name":"道路旅客运输"},{"id":"21474837195","name":"境外租车服务"},{"id":"21474837196","name":"水上旅客运输"},{"id":"21474837197","name":"铁路旅客运输"},{"id":"21474837198","name":"乡村游及文旅小镇"},{"id":"21474837199","name":"游学观光活动"},{"id":"21474837200","name":"出行资讯及票务预定平台"},{"id":"21474837201","name":"动植物园"},{"id":"21474837202","name":"度假区"},{"id":"21474837203","name":"景点景区"},{"id":"21474837204","name":"主题乐园"},{"id":"21474837205","name":"酒店-境内"},{"id":"21474837206","name":"酒店-境外"},{"id":"21474837207","name":"露营地服务"},{"id":"21474837208","name":"出行服务平台"},{"id":"21474837209","name":"境内租车服务"},{"id":"21474836488","name":"护肤彩妆"},{"id":"21474837292","name":"一般化妆品-面部洗护"},{"id":"21474837293","name":"一般化妆品-彩妆香水"},{"id":"21474837289","name":"特殊用途化妆品-护肤"},{"id":"21474837294","name":"特殊用途化妆品-护发"},{"id":"21474837295","name":"特殊用途化妆品-美体"},{"id":"21474837290","name":"美容工具"},{"id":"21474836496","name":"运动户外"},{"id":"21474838090","name":"户外装备"},{"id":"21474838092","name":"体育用品"},{"id":"21474838094","name":"运动户外服饰鞋帽箱包"},{"id":"21474838095","name":"健身器械"},{"id":"21474838096","name":"健身电器"},{"id":"21474836497","name":"珠宝钟表眼镜"},{"id":"21474838186","name":"珠宝首饰"},{"id":"21474838187","name":"钟表"},{"id":"21474838188","name":"文玩和艺术品"},{"id":"21474838189","name":"眼镜"},{"id":"21474836501","name":"医疗健康"},{"id":"21474838584","name":"美容减肥保健食品"},{"id":"21474838586","name":"互联网诊疗平台"},{"id":"21474838587","name":"健康资讯服务平台"},{"id":"21474838589","name":"精神卫生中心"},{"id":"21474838592","name":"药品资讯信息"},{"id":"21474838594","name":"医疗器械零售"},{"id":"21474838595","name":"假肢生产装配"},{"id":"21474838596","name":"美容整形医院"},{"id":"21474838597","name":"体检机构"},{"id":"21474838598","name":"综合医院"},{"id":"21474838600","name":"口腔医院"},{"id":"21474838601","name":"疗养院"},{"id":"21474838602","name":"临床检验服务机构"},{"id":"21474838603","name":"社区卫生服务中心"},{"id":"21474838604","name":"特殊医学用途配方食品"},{"id":"21474838605","name":"诊所"},{"id":"21474838606","name":"中医医院"},{"id":"21474838607","name":"保健用品"},{"id":"21474838608","name":"宠物医院"},{"id":"21474838609","name":"宠物用药"},{"id":"21474838610","name":"保健食品"},{"id":"21474838611","name":"保健食品用品零售"},{"id":"21474838612","name":"海外保健食品"},{"id":"21474838613","name":"药店"},{"id":"21474838614","name":"药品交易平台"},{"id":"21474838615","name":"成人类药品"},{"id":"21474838616","name":"药品"},{"id":"21474838617","name":"成人医疗器械"},{"id":"21474838618","name":"医疗器械"},{"id":"21474838619","name":"不孕不育医院"},{"id":"21474838620","name":"妇产医院"},{"id":"21474838621","name":"皮肤专科医院"},{"id":"21474838622","name":"其他专科医院"},{"id":"21474838623","name":"眼科医院"},{"id":"21474838624","name":"植发机构"},{"id":"21474836504","name":"亲子"},{"id":"21474838891","name":"儿童服饰鞋帽箱包"},{"id":"21474838893","name":"婴幼儿食品"},{"id":"21474838897","name":"儿童用品"},{"id":"21474838898","name":"孕妇服饰及用品"},{"id":"21474836508","name":"房地产"},{"id":"21474839281","name":"房地产开发商"},{"id":"21474839286","name":"房地产综合服务平台"},{"id":"21474839287","name":"物业管理服务"},{"id":"21474839288","name":"房地产中介服务"},{"id":"21474839289","name":"房地产租赁经营"},{"id":"21474836509","name":"交通运输和仓储"},{"id":"21474839386","name":"铁路货物运输"},{"id":"21474839387","name":"道路货物运输"},{"id":"21474839389","name":"航空货物运输"},{"id":"21474839390","name":"水上货物运输"},{"id":"21474839391","name":"装卸搬运和仓储业"},{"id":"21474836511","name":"节能环保"},{"id":"21474839581","name":"污染处理"},{"id":"21474839582","name":"废旧回收"},{"id":"21474839583","name":"节能设备"},{"id":"21474839584","name":"环保设备"},{"id":"21474839585","name":"环境评测"},{"id":"21474836515","name":"家装家具"},{"id":"21474839987","name":"家具建材综合服务平台"},{"id":"21474839992","name":"家居建材卖场及门店"},{"id":"21474839993","name":"装修环境治理"},{"id":"21474839994","name":"成品家具"},{"id":"21474839995","name":"定制家具"},{"id":"21474839996","name":"家装辅材"},{"id":"21474839997","name":"家装主材"},{"id":"21474839998","name":"陶瓷卫浴"},{"id":"21474839999","name":"智能家居"},{"id":"21474840000","name":"冷暖设备安装"},{"id":"21474840001","name":"软装服务"},{"id":"21474840002","name":"设计公司"},{"id":"21474840003","name":"装修公司"},{"id":"21474836516","name":"通讯和IT服务"},{"id":"21474840081","name":"通信运营商"},{"id":"21474840083","name":"存储支持服务商"},{"id":"21474840089","name":"物联网技术服务商"},{"id":"21474840090","name":"SaaS及建站服务"},{"id":"21474840091","name":"企业定制化IT和信息系统"},{"id":"21474840092","name":"通信设备"},{"id":"21474836517","name":"日用百货"},{"id":"21474840191","name":"厨具"},{"id":"21474840192","name":"家庭清洁用品"},{"id":"21474840193","name":"女性护理"},{"id":"21474840199","name":"文具"},{"id":"21474840200","name":"家纺"},{"id":"21474840201","name":"家居工艺品"},{"id":"21474840202","name":"成人用品"},{"id":"21474840203","name":"家居日用"},{"id":"21474840204","name":"生活用纸"},{"id":"21474840205","name":"宠物用品"},{"id":"21474840206","name":"乐器"},{"id":"21474840207","name":"鲜花绿植"},{"id":"21474836519","name":"国家机构协会和社会工作"},{"id":"21474840383","name":"公益组织"},{"id":"21474840384","name":"境外政府组织"},{"id":"21474840385","name":"国际组织"},{"id":"21474840386","name":"境外机构及NGO"},{"id":"21474840388","name":"国家党政机关及事业单位"},{"id":"21474840389","name":"社会保障"},{"id":"21474840390","name":"社会工作"},{"id":"21474840391","name":"社会团体"},{"id":"21474836521","name":"汽车"},{"id":"21474840583","name":"汽车综合服务平台"},{"id":"21474840590","name":"二手车经营"},{"id":"21474840591","name":"驾校"},{"id":"21474840592","name":"汽车-4S店\/经销商"},{"id":"21474840593","name":"车辆养护服务"},{"id":"21474840594","name":"汽车配件"},{"id":"21474840595","name":"汽车厂商-合资"},{"id":"21474840596","name":"汽车厂商-外资"},{"id":"21474840597","name":"汽车厂商-自主"},{"id":"21474840598","name":"专用车辆厂商"},{"id":"21474840599","name":"汽车养护品"},{"id":"21474840600","name":"汽车装饰品"},{"id":"21474840601","name":"摩托和助力车厂商"},{"id":"21474840602","name":"摩托和助力车卖场及门店"},{"id":"21474836522","name":"软件工具"},{"id":"21474840681","name":"办公工具"},{"id":"21474840685","name":"摄影摄像工具"},{"id":"21474840686","name":"天气日历"},{"id":"21474840687","name":"社交工具"},{"id":"21474840688","name":"通讯工具"},{"id":"21474840691","name":"地图导航"},{"id":"21474840692","name":"体育健康工具"},{"id":"21474840693","name":"操作系统"},{"id":"21474840694","name":"开发工具"},{"id":"21474840695","name":"视频播放与编辑工具"},{"id":"21474840696","name":"图形图像美化"},{"id":"21474840697","name":"网络工具"},{"id":"21474840698","name":"网络赚钱工具"},{"id":"21474840699","name":"系统美化"},{"id":"21474840700","name":"音乐播放与编辑工具"},{"id":"21474840701","name":"阅读与听书工具"},{"id":"21474840702","name":"安全清理"},{"id":"21474840703","name":"系统工具与效率工具"},{"id":"21474836523","name":"游戏"},{"id":"21474840781","name":"角色扮演"},{"id":"21474840782","name":"策略"},{"id":"21474840783","name":"体育"},{"id":"21474840784","name":"棋牌"},{"id":"21474840785","name":"音乐"},{"id":"21474840786","name":"模拟经营"},{"id":"21474840787","name":"休闲"},{"id":"21474840788","name":"益智"},{"id":"21474840789","name":"射击"},{"id":"21474840790","name":"养成"},{"id":"21474840791","name":"格斗"},{"id":"21474840792","name":"冒险"},{"id":"21474840793","name":"卡牌"},{"id":"21474840794","name":"竞速"},{"id":"21474840796","name":"MOBA"},{"id":"21474840797","name":"电子竞技"},{"id":"21474840798","name":"网络赚钱游戏"},{"id":"21474840799","name":"游戏综合服务平台"},{"id":"21474836526","name":"农林牧渔和采矿"},{"id":"21474841081","name":"兽医兽药"},{"id":"21474841082","name":"农药化肥"},{"id":"21474841083","name":"种植养殖"},{"id":"21474841084","name":"园林景观"},{"id":"21474841085","name":"采矿业"},{"id":"21474841086","name":"动物饲料"},{"id":"21474836527","name":"出版发行"},{"id":"21474841183","name":"广播电视发行"},{"id":"21474841185","name":"报纸出版"},{"id":"21474841186","name":"期刊杂志出版"},{"id":"21474841187","name":"图书出版"},{"id":"21474841188","name":"电影发行"},{"id":"21474841189","name":"音像制品出版"},{"id":"21474836528","name":"数码家电"},{"id":"21474841293","name":"电脑"},{"id":"21474841294","name":"手机"},{"id":"21474841295","name":"摄影摄像设备"},{"id":"21474841296","name":"数码配件"},{"id":"21474841297","name":"视听设备"},{"id":"21474841298","name":"办公设备"},{"id":"21474841299","name":"教育电子设备"},{"id":"21474841300","name":"个人智能设备"},{"id":"21474841301","name":"家用电器"},{"id":"21474841303","name":"电子游戏设备"},{"id":"21474841305","name":"按摩电子设备"},{"id":"21474841306","name":"个护电器"},{"id":"21474841307","name":"美容电子仪器"},{"id":"21474836530","name":"餐饮"},{"id":"21474841481","name":"烘焙甜品"},{"id":"21474841482","name":"咖啡店"},{"id":"21474841484","name":"西餐"},{"id":"21474841485","name":"火锅串串"},{"id":"21474841486","name":"自助餐"},{"id":"21474841487","name":"烧烤烤肉"},{"id":"21474841491","name":"国外美食"},{"id":"21474841492","name":"西式快餐"},{"id":"21474841493","name":"小吃卤味"},{"id":"21474841494","name":"中式快餐"},{"id":"21474841495","name":"冰淇淋店"},{"id":"21474841496","name":"茶饮果汁"},{"id":"21474841497","name":"酒吧"},{"id":"21474841498","name":"中国地方菜系"},{"id":"21474836531","name":"零售和百货"},{"id":"21474841581","name":"超市"},{"id":"21474841582","name":"便利店"},{"id":"21474841583","name":"购物中心"},{"id":"21474841584","name":"综合百货"},{"id":"21474841585","name":"服饰鞋帽箱包卖场及门店"},{"id":"21474841586","name":"护肤彩妆卖场及门店"},{"id":"21474841587","name":"亲子卖场及门店"},{"id":"21474841588","name":"日用百货卖场及门店"},{"id":"21474841589","name":"食品卖场及门店"},{"id":"21474841590","name":"数码家电卖场和门店"},{"id":"21474841591","name":"运动户外卖场及门店"},{"id":"21474841592","name":"珠宝钟表眼镜卖场及门店"},{"id":"21474841593","name":"成人用品卖场及门店"},{"id":"21474841594","name":"酒类卖场和门店"},{"id":"21474836535","name":"服饰鞋帽箱包"},{"id":"21474841981","name":"服装"},{"id":"21474841982","name":"贴身衣物"},{"id":"21474841983","name":"一般服装配饰"},{"id":"21474841984","name":"鞋类"},{"id":"21474841985","name":"袜类"},{"id":"21474841986","name":"帽类"},{"id":"21474841988","name":"箱包"},{"id":"21474836536","name":"工业工程和安保"},{"id":"21474842081","name":"保安安保"},{"id":"21474842082","name":"防盗报警"},{"id":"21474842083","name":"交通消防"},{"id":"21474842085","name":"门禁考勤"},{"id":"21474842086","name":"电子电工"},{"id":"21474842087","name":"机械设备"},{"id":"21474842088","name":"化工材料和制品"},{"id":"21474836537","name":"能源和供应"},{"id":"21474842181","name":"电力热力生产和供应"},{"id":"21474842182","name":"燃气生产和供应"},{"id":"21474842183","name":"燃油生产和供应"},{"id":"21474842184","name":"水的生产和供应"},{"id":"21474836538","name":"商务服务"},{"id":"21474842281","name":"办公场景服务"},{"id":"21474842282","name":"互联网代理运营服务"},{"id":"21474842283","name":"环保咨询"},{"id":"21474842284","name":"信用服务"},{"id":"21474842285","name":"营销策划与服务"},{"id":"21474842286","name":"公证服务"},{"id":"21474842287","name":"律师及法律服务"},{"id":"21474842288","name":"司法鉴定"},{"id":"21474842289","name":"出国中介"},{"id":"21474842290","name":"商务代理代办服务"},{"id":"21474842291","name":"翻译服务"},{"id":"21474842292","name":"管理咨询"},{"id":"21474842293","name":"广告包装设计制作"},{"id":"21474842294","name":"拍卖服务"},{"id":"21474842295","name":"配音服务"},{"id":"21474842296","name":"市场调查"},{"id":"21474842297","name":"喷绘印刷"},{"id":"21474842298","name":"营销机构"},{"id":"21474842299","name":"会展服务"},{"id":"21474842300","name":"婚恋会展"},{"id":"21474842301","name":"家居会展"},{"id":"21474842302","name":"旅游会展"},{"id":"21474842303","name":"贸易会展"},{"id":"21474842304","name":"汽车会展"},{"id":"21474842305","name":"文体会展"},{"id":"21474842306","name":"消费品展"},{"id":"21474842307","name":"代理记账"},{"id":"21474842308","name":"评估清算"},{"id":"21474842309","name":"审计服务"},{"id":"21474842310","name":"税收筹划"},{"id":"21474842311","name":"人力资源服务"},{"id":"21474842312","name":"招聘猎头平台"},{"id":"21474836539","name":"科研和技术服务"},{"id":"21474842381","name":"科学技术服务"},{"id":"21474842382","name":"知识产权服务"},{"id":"21474836540","name":"文化体育娱乐活动"},{"id":"21474842481","name":"体育俱乐部"},{"id":"21474842482","name":"文化艺术体育场馆"},{"id":"21474842483","name":"文化艺术体育活动"},{"id":"21474842484","name":"文体设备用品租赁"},{"id":"21474842485","name":"彩票"},{"id":"21474842486","name":"艺人网红经纪代理"},{"id":"21474842487","name":"文化艺术体育资讯综合平台"},{"id":"21474836541","name":"生活服务"},{"id":"21474842581","name":"保健养生服务"},{"id":"21474842583","name":"二手物品回收"},{"id":"21474842584","name":"儿童托管"},{"id":"21474842585","name":"管道疏通"},{"id":"21474842586","name":"结婚喜品"},{"id":"21474842587","name":"结婚综合服务平台"},{"id":"21474842588","name":"刻章"},{"id":"21474842589","name":"美体瘦身"},{"id":"21474842590","name":"情感咨询"},{"id":"21474842591","name":"摄影基地场地"},{"id":"21474842592","name":"生活服务优惠资讯"},{"id":"21474842594","name":"洗浴"},{"id":"21474842595","name":"养老服务"},{"id":"21474842596","name":"专用洗护"},{"id":"21474842597","name":"婚介所"},{"id":"21474842598","name":"婚恋线上平台"},{"id":"21474842599","name":"婚纱礼服"},{"id":"21474842600","name":"母婴护理"},{"id":"21474842601","name":"婚纱摄影"},{"id":"21474842602","name":"亲子摄影"},{"id":"21474842603","name":"爱好收藏"},{"id":"21474842604","name":"搬家服务"},{"id":"21474842605","name":"房屋维修"},{"id":"21474842606","name":"家电维修"},{"id":"21474842607","name":"家政服务"},{"id":"21474842608","name":"礼品卡券"},{"id":"21474842609","name":"开锁服务"},{"id":"21474842610","name":"美发护发"},{"id":"21474842611","name":"生活综合服务平台"},{"id":"21474842612","name":"运动健身场所"},{"id":"21474842613","name":"占卜起名"},{"id":"21474842614","name":"婚礼策划"},{"id":"21474842615","name":"结婚服务"},{"id":"21474842616","name":"个人摄影"},{"id":"21474842617","name":"商业摄影"},{"id":"21474842618","name":"摄影摄像设备租赁"},{"id":"21474842619","name":"宠物服务"},{"id":"21474842620","name":"乐器琴行"},{"id":"21474842621","name":"美甲美睫"},{"id":"21474842622","name":"美容\/SPA"},{"id":"21474842623","name":"加油和充电站"},{"id":"21474842624","name":"快照洗印"},{"id":"21474842625","name":"快递闪送服务"},{"id":"21474842626","name":"邮政服务"},{"id":"21474842627","name":"鲜花礼品实体店"},{"id":"21474842628","name":"KTV"},{"id":"21474842629","name":"户外休闲娱乐场所"},{"id":"21474842630","name":"室内场景娱乐场所"},{"id":"21474842631","name":"网吧"},{"id":"21474842632","name":"影剧院"},{"id":"21474842633","name":"票务代售点"},{"id":"21474836542","name":"食品"},{"id":"21474842681","name":"冰淇淋"},{"id":"21474842682","name":"营养及健康食品"},{"id":"21474842683","name":"茶叶"},{"id":"21474842684","name":"粮油调味速食"},{"id":"21474842685","name":"乳制品"},{"id":"21474842686","name":"软饮料和冲饮"},{"id":"21474842687","name":"休闲食品"},{"id":"21474842689","name":"宠物饲料制造"},{"id":"21474842690","name":"冷冻速食品"},{"id":"21474842691","name":"冷链肉类"},{"id":"21474842692","name":"水产品"},{"id":"21474842693","name":"新鲜禽蛋"},{"id":"21474842694","name":"新鲜蔬菜及菌类"},{"id":"21474842695","name":"新鲜水果"},{"id":"21474836543","name":"酒水"},{"id":"21474842781","name":"白酒"},{"id":"21474842782","name":"黄酒"},{"id":"21474842783","name":"米酒"},{"id":"21474842784","name":"配制酒"},{"id":"21474842785","name":"啤酒"},{"id":"21474842786","name":"葡萄酒"},{"id":"21474842787","name":"其它果酒"},{"id":"21474842788","name":"洋酒"},{"id":"21474836544","name":"互联网内容资讯服务"},{"id":"21474842881","name":"在线新闻及资讯"},{"id":"21474842882","name":"在线直播平台"},{"id":"21474842883","name":"音乐流媒体平台"},{"id":"21474842884","name":"在线视频平台"},{"id":"21474842885","name":"阅读与在线FM收听"},{"id":"21474842886","name":"数字动漫平台"},{"id":"21474836545","name":"数字内容创作"},{"id":"21474842981","name":"录音内容制作"},{"id":"21474842982","name":"其他视频内容"},{"id":"21474842983","name":"其他图文内容"},{"id":"21474842984","name":"数字小说创作"},{"id":"21474842985","name":"数字音乐"},{"id":"21474842986","name":"网络影视综艺"},{"id":"21474842987","name":"直播内容"},{"id":"21474842988","name":"微信自媒体-财经"},{"id":"21474842989","name":"微信自媒体-科教文化"},{"id":"21474842990","name":"微信自媒体-旅游"},{"id":"21474842991","name":"微信自媒体-美食"},{"id":"21474842992","name":"微信自媒体-汽车房产"},{"id":"21474842993","name":"微信自媒体-亲子育儿"},{"id":"21474842994","name":"微信自媒体-情感美文"},{"id":"21474842995","name":"微信自媒体-社会"},{"id":"21474842996","name":"微信自媒体-生活"},{"id":"21474842997","name":"微信自媒体-时尚美容"},{"id":"21474842998","name":"微信自媒体-运动体育"},{"id":"21474842999","name":"漫画"},{"id":"21474843000","name":"数字报纸杂志"},{"id":"21474843001","name":"电影电视"},{"id":"21474836546","name":"互联网其他服务"},{"id":"21474843081","name":"互联网公共服务平台"},{"id":"21474843082","name":"互联网公益平台"},{"id":"21474843083","name":"互联网众包服务平台"},{"id":"21474843084","name":"综合线上社区"},{"id":"21474843085","name":"互联网搜索"},{"id":"21474836548","name":"玩具"},{"id":"21474843282","name":"儿童玩具"},{"id":"21474843281","name":"休闲玩具"},{"id":"21474836547","name":"个人护理"},{"id":"21474843182","name":"头部\/身体洗护"},{"id":"21474843181","name":"口腔护理"}]';
        $industryArr = json_decode($industryStr, true);
        $industryArr = array_column($industryArr, 'name', 'id');

        return Grid::make(new AdvertiseRepository(), function (Grid $grid) use ($industryArr){
            $grid->actions(function (Grid\Displayers\Actions $actions) {
                $actions->disableDelete();
                $actions->disableEdit();
                $actions->disableQuickEdit();
                $actions->disableView();
            })->disableActions();
            // 这里的字段会自动使用翻译文件
            $grid->column('id')->sortable();

            $grid->column('account_id', '广告主帐号');
            $grid->column('system_status', '状态');
            $grid->column('corporation_name', '企业名称');
//            $grid->column('corporate_brand_name', '品牌名称');
            $grid->column('system_industry_id', '行业名称')->display(function ($industry_id) use ($industryArr){
                return $industryArr[$industry_id];
            });

            $grid->filter(function (Grid\Filter $filter) {
                $filter->equal('account_id', '广告主帐号');
                $filter->equal('system_status', '状态')->select([
                    'CUSTOMER_STATUS_NORMAL' => '有效',
                    'CUSTOMER_STATUS_PENDING' => '待审核',
                    'CUSTOMER_STATUS_DENIED' => '审核不通过',
                    'CUSTOMER_STATUS_FROZEN' => '封停',
                    'CUSTOMER_STATUS_TOBE_ACCEPTED' => '待接受',
                    'CUSTOMER_STATUS_TOBE_ACTIVATED' => '待激活',
                    'CUSTOMER_STATUS_SUSPEND' => '暂停',
                    'CUSTOMER_STATUS_MATERIAL_PREPARED' => '广告主资料准备',
                    'CUSTOMER_STATUS_DELETED' => '删除',
                    'CUSTOMER_STATUS_FROZEN_TEMPORARILY' => '临时冻结',
                    'CUSTOMER_STATUS_UNREGISTERED' => '未注册',
                ]);

            });
        });
    }

//    /**
//     * Make a show builder.
//     *
//     * @param mixed $id
//     *
//     * @return Show
//     */
//    protected function detail($id)
//    {
//        return Show::make($id, new AdvertiseRepository(), function (Show $show) {
//            // 这里的字段会自动使用翻译文件
//            $show->field('id');
//            $show->field('account_id', '广告主帐号');
//            $show->field('system_status', '状态');
//            $show->field('corporation_name', '企业名称');
//            $show->field('corporate_brand_name', '品牌名称');
//            $show->field('customized_industry', '行业名称');
//        });
//    }
//
//    /**
//     * Make a form builder.
//     *
//     * @return Form
//     */
//    protected function form()
//    {
//        return Form::make(new AdvertiseRepository(), function (Form $form) {
//            // 这里的字段会自动使用翻译文件
//            $form->display('id');
//            $form->text('account_id', '广告主帐号');
//            $form->text('system_status', '状态');
//            $form->text('corporation_name', '企业名称');
//            $form->text('corporate_brand_name', '品牌名称');
//            $form->text('customized_industry', '行业名称');
//        });
//    }
}
